package com.vhall.component.entity.rbac.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author dalong
 * @date 2021-05-14 14:26
 */
@Data
public class MenuAddReqVO implements Serializable {
    private static final long serialVersionUID = 8589450946125559298L;
    @NotBlank(message = "名称不能为空")
    @ParamName(value = "name")
    private String name;
    @NotBlank(message = "链接不能为空")
    @ParamName(value = "url")
    private String url;

    @NotBlank(message = "pid不能为空")
    @Pattern(regexp = "^[0-9]+[0-9]*$", message = "pid必须为>=0的正整数")
    private String pid;


    private Byte sort;

    private String token;

    private Byte type;
}
